home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-0039 / source / dcprint.mod < prev    next >
Text File  |  1997-04-16  |  3KB  |  101 lines

  1. IMPLEMENTATION MODULE DCPrint;
  2.  
  3. (* This program will PRINT pictures.
  4.  
  5. *)
  6.  
  7. (*--------------------------------------------------------------------*)
  8. (*   This is version 1.00         April 1987      L.G. Miller.        *)
  9. (*--------------------------------------------------------------------*)
  10.  
  11. (* Pressing the left mouse button whilst printing will request an
  12.    ABORT of the print.
  13.  *)
  14.  
  15. (*   IMPORT Trace; *)
  16.  
  17. FROM SYSTEM             IMPORT  ADDRESS, ADR;
  18.  
  19. FROM Graphics        IMPORT  graf_mouse;
  20.  
  21. IMPORT Forms;
  22.  
  23. IMPORT DCPrnt09;
  24.  
  25. IMPORT DCPrnt24;
  26.  
  27. IMPORT DCPrtCnv;
  28.  
  29. FROM ManyWindows        IMPORT VDIHandle, ShowAlert;
  30.  
  31. FROM Strings            IMPORT String, Assign, Concat;
  32.  
  33. FROM DCGlobal           IMPORT
  34. (* CONST *)
  35.  
  36.   HiResMaxX,         (* =  639; *)  
  37.   HiResMaxY,         (* =  399; *)  
  38.   HiResNoPlanes,     (* =  1; *)
  39.  
  40.  
  41. (* TYPE *)
  42.  
  43.   PrinterTypes,
  44.  
  45.   PictureImage,
  46.   PrintImage,
  47.  
  48.   HiResScreen,
  49.  
  50.   DegasPicture;
  51.  
  52. (*  ---------------------------------------------------------- *)
  53. CONST
  54.    ESC = CHR(1BH);
  55.    Arrow     =  0;
  56.    HourGlass    =  2;
  57.  
  58.  
  59. PROCEDURE PrintHiResPicture ( VAR PictureDetails : PictureImage;
  60.                               VAR PrintDetails   : PrintImage;
  61.                               VAR Picture        : HiResScreen );
  62.   VAR dumc : CARDINAL;        
  63.   BEGIN
  64.     dumc := graf_mouse(HourGlass, NIL);
  65.     IF ( DCPrtCnv.QueryPrinterToUse() = EpsonLQ80 ) THEN
  66.        IF PrintDetails.QueryLandscapePrint THEN
  67.           DCPrnt24.PrintHiResPicture24L( PictureDetails,
  68.                                          PrintDetails,
  69.                                          Picture );
  70.        ELSE
  71.           DCPrnt24.PrintHiResPicture24P( PictureDetails,
  72.                                          PrintDetails,
  73.                                          Picture );
  74.        END;
  75.     ELSE
  76.        IF PrintDetails.QueryLandscapePrint THEN
  77.           DCPrnt09.PrintHiResPicture09L( PictureDetails,
  78.                                          PrintDetails,
  79.                                          Picture );
  80.        ELSE
  81.           DCPrnt09.PrintHiResPicture09P( PictureDetails,
  82.                                          PrintDetails,
  83.                                          Picture );
  84.        END;
  85.     END;
  86.  
  87.     dumc := graf_mouse(Arrow, NIL);
  88.   END PrintHiResPicture;
  89.  
  90.  
  91. PROCEDURE SetPrinterToUse( ptype : PrinterTypes );
  92.   BEGIN
  93.     DCPrtCnv.SetPrinterToUse(ptype);
  94.   END SetPrinterToUse;
  95.  
  96. BEGIN
  97.   SetPrinterToUse(EpsonLQ80);
  98.  
  99.  
  100. END DCPrint.
  101.